package com.zone.vehicle.superapp.view.home.detail;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Intent;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Toast;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProvider;
import androidx.recyclerview.widget.DefaultItemAnimator;
import androidx.recyclerview.widget.LinearLayoutManager;

import com.alibaba.fastjson.JSON;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.loadmore.SimpleLoadMoreView;
import com.saicmotor.pay.entity.OrderEntity;
import com.saicmotor.pay.util.PayUtils;
import com.youth.banner.adapter.BannerImageAdapter;
import com.youth.banner.holder.BannerImageHolder;
import com.youth.banner.indicator.CircleIndicator;
import com.zone.lib.download.enums.AppStatusEnum;
import com.zone.lib.download.db.entity.Download;
import com.zone.lib.download.enums.AppTypeEnum;
import com.zone.sdk.common.http.base.Result;
import com.zone.sdk.module.appstore.entity.AppDetailSku;
import com.zone.sdk.module.appstore.entity.ResourceItem;
import com.zone.sdk.module.appstore.entity.UserEntity;
import com.zone.sdk.module.comment.entity.ReplyEntity;
import com.zone.vehicle.lib.view.utils.ImageUtil;
import com.zone.vehicle.sdk.module.superapp.response.AppPushResponse;
import com.zone.vehicle.superapp.R;
import com.zone.vehicle.superapp.bean.AppBean;
import com.zone.vehicle.superapp.databinding.FragmentAppDetailBinding;
import com.zone.vehicle.superapp.model.HomeViewModel;
import com.zone.vehicle.superapp.model.ViewModelFactory;
import com.zone.vehicle.superapp.utils.SharedPreferencesUtil;
import com.zone.vehicle.superapp.view.common.base.BaseFragment;
import com.zone.vehicle.superapp.view.home.home.main.adapter.CommentDialogSingleAdapter;
import com.zone.vehicle.superapp.view.home.detail.widget.VerticalCommentLayout;

import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.song.videoplayer.IVideoPlayer;
import org.song.videoplayer.PlayListener;
import org.song.videoplayer.QSVideo;

import java.util.ArrayList;
import java.util.List;

import cc.shinichi.library.ImagePreview;
import com.zone.vehicle.superapp.view.login.LoginActivity;

import static com.zone.lib.download.enums.AppStatusEnum.LIGHT_INSTALL_COMPLETE;
import static com.zone.vehicle.superapp.view.common.base.Constants.MUTE;
import static com.zone.vehicle.superapp.view.home.HomeFragment.ORDER_SUBMIT_FRAGMENT;
import static org.song.videoplayer.IVideoPlayer.EVENT_MUTE_CHANGED;


public class AppDetailFragment extends BaseFragment implements VerticalCommentLayout.CommentItemClickListener, BaseQuickAdapter.RequestLoadMoreListener {

    private static final String TAG = AppDetailFragment.class.getSimpleName();

    private FragmentAppDetailBinding binding;

    private HomeViewModel<AppBean> viewModel;

    private CommentDialogSingleAdapter bottomSheetAdapter;

    private Activity activity;

    private boolean mute = false; //默认静音

    private Runnable mSubmitRunnable = new Runnable() {
        @Override
        public void run() {
            OrderEntity orderEntity = viewModel.getOrderEntity().getValue();
            if (ObjectUtils.isEmpty(orderEntity)) {
                return;
            }
            switch (orderEntity.getOrderStatus()) {
                case PayUtils.ORDER_ST_NEED_PAY:
                    changePage(ORDER_SUBMIT_FRAGMENT);
                    break;
                case PayUtils.ORDER_ST_ALREADY_PAY:
                case PayUtils.ORDER_ST_FINISHED:
                case PayUtils.ORDER_ST_SHIPPED:
                    viewModel.downLoadApp(getContext(), AppStatusEnum.DOWNLOAD_PREPARE.CODE);
                    break;
                case PayUtils.ORDER_ST_CANCELED:
                    Toast.makeText(activity, "订单已取消", Toast.LENGTH_SHORT).show();
                    break;
                case PayUtils.ORDER_ST_TO_BE_REFUNDED:
                    Toast.makeText(activity, "订单取消成功，正在退款中", Toast.LENGTH_SHORT).show();
                    break;
                case PayUtils.ORDER_ST_REFUNDED:
                    Toast.makeText(activity, "订单已经退款", Toast.LENGTH_SHORT).show();
                    break;
                default:
                    Log.w(TAG, "error order status " + orderEntity.getOrderStatus());
            }
        }
    };

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        activity = getActivity();
        mute = SharedPreferencesUtil.getInstance(activity).getBoolean(MUTE, false);
    }

    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater,
                             @Nullable ViewGroup container,
                             @Nullable Bundle savedInstanceState) {
        binding = FragmentAppDetailBinding.inflate(inflater);
        viewModel = new ViewModelProvider(requireActivity(), new ViewModelFactory()).get(HomeViewModel.class);
        initView();
        initData();
        return binding.getRoot();
    }

    @SuppressLint("SetTextI18n")
    private void initView(){
        binding.btnDownload.setText(AppStatusEnum.DOWNLOAD_DEFAULT.TITLE);
        //评论
        binding.commentLayout.setHasFixedSize(true);
        binding.commentLayout.setLayoutManager(new LinearLayoutManager(getContext()));
        binding.commentLayout.setItemAnimator(new DefaultItemAnimator());
        bottomSheetAdapter = new CommentDialogSingleAdapter(this);
        bottomSheetAdapter.setLoadMoreView(new SimpleLoadMoreView());
        bottomSheetAdapter.setOnLoadMoreListener(this, binding.commentLayout);
        binding.commentLayout.setAdapter(bottomSheetAdapter);

        binding.btnBack.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Log.d(TAG, "AppDetailFragment btnBack onClick");
                onBack();
            }
        });

        viewModel.getCurrentApp().observe(getViewLifecycleOwner(), new Observer<AppBean>() {
            @Override
            public void onChanged(AppBean appBean) {
                if (ObjectUtils.isNotEmpty(appBean)){
                    Log.d(TAG, "appBean="+ JSON.toJSONString(appBean));
                    if (StringUtils.isNotEmpty(appBean.getName())) {
                        binding.name.setText(appBean.getName());
                    }
                    binding.producer.setText(appBean.getProducer());
                    if (ObjectUtils.isNotEmpty(appBean.getAppType())) {
                        Download download = appBean.getDownload();
                        if (ObjectUtils.isNotEmpty(download)){
                            AppStatusEnum appStatusEnum = AppStatusEnum.get(download.getDownloadStatus());
                            if (ObjectUtils.isNotEmpty(appStatusEnum)) {
                                binding.btnDownload.setText(appStatusEnum.TITLE);
                                switch (appStatusEnum) {
                                    case DOWNLOAD_LOADING:
                                    case DOWNLOAD_PAUSE:
                                        binding.btnDownload.setBackgroundColor(Color.TRANSPARENT);
                                        break;
                                    case DOWNLOAD_NEED_PAY:
                                        binding.btnDownload.setBackgroundResource(R.drawable.border_main);
                                        if (appBean.needPay()){
                                            String downloadTxt = "下载 （";
                                            downloadTxt += "¥" + appBean.getProductPrice();
                                            downloadTxt += ")";
                                            binding.btnDownload.setText(downloadTxt);
                                        }
                                        break;
                                    case DOWNLOAD_PAYING:
                                        binding.btnDownload.setBackgroundColor(getResources().getColor(R.color.custom_progress_red_progress));
                                        break;
                                    case INSTALL_FAIL:
                                        binding.installProgress.setVisibility(View.GONE);
                                        break;
                                    case DOWNLOAD_PAYED:
                                    default:
                                        binding.btnDownload.setText(appStatusEnum.TITLE);
                                        binding.btnDownload.setBackgroundResource(R.drawable.border_main);                                        break;
                                }
                            } else {
                                binding.btnDownload.setBackgroundResource(R.drawable.border_main);
                            }
                            if (appStatusEnum != AppStatusEnum.INSTALL_SUCCESS && appStatusEnum != AppStatusEnum.INSTALL_FAIL) {
                                if (download.getTotal() > 0) {
                                    binding.downloadProgress.setProgress((int) (download.getDownloadLocation() * 100 / download.getTotal()));
                                } else {
                                    binding.downloadProgress.setProgress(0);
                                }
                            }
                        } else {
                            binding.btnDownload.setBackgroundResource(R.drawable.border_main);
                            if (appBean.needPay() && ObjectUtils.isEmpty(appBean.getPay())){
                                String downloadTxt = "下载";
                                if (appBean.getAppType().equals(AppTypeEnum.APP_LIGHT.getName())) {
                                    downloadTxt = AppStatusEnum.DOWNLOAD_DEFAULT_LIGHT.TITLE;
                                }
                                downloadTxt += " （";
                                downloadTxt += "¥" + appBean.getProductPrice();
                                downloadTxt += ")";
                                binding.btnDownload.setText(downloadTxt);
                            } else {
//                                if (ObjectUtils.isNotEmpty(appBean.getPay())){
//                                    binding.btnDownload.setBackgroundResource(R.drawable.cloud_down);
//                                    Drawable drawable = getResources().getDrawable(
//                                            R.drawable.cloud_down);
//                                    drawable.setBounds(0, 0, drawable.getMinimumWidth(),
//                                            drawable.getMinimumHeight());
////                                    binding.btnDownload.setCompoundDrawables(null, null, drawable, null);
//                                    binding.btnDownload.setBackgroundDrawable(drawable);
//                                }else {
                                    if (appBean.getAppType().equals(AppTypeEnum.APP_LIGHT.getName())) {
                                        binding.btnDownload.setText(AppStatusEnum.DOWNLOAD_DEFAULT_LIGHT.TITLE);
                                    } else {
                                        String downloadTxt = "下载 （";
                                        if (StringUtils.isNotEmpty(appBean.getFileSize())) {
                                            downloadTxt += appBean.getFileSize();
                                        }
                                        downloadTxt += ")";
                                        binding.btnDownload.setText(downloadTxt);
                                    }
//                                }

                            }
                        }
                    }
                    if (appBean.getAppType().equals(AppTypeEnum.APP_LIGHT.getName())) {
                        binding.appSize.setVisibility(View.GONE);
                    } else {
                        binding.appSize.setVisibility(View.VISIBLE);
                    }
                    ResourceItem resource = appBean.getPreview();
                    if (ObjectUtils.isNotEmpty(resource)){
                        if (resource.isPicture()){
                            binding.pic.setVisibility(View.VISIBLE);
                            binding.qs.setVisibility(View.INVISIBLE);
                            ImageUtil.load(activity, binding.pic, resource.getResourceUrl());
                        }else if (resource.isVideo()){
                            binding.qs.setVisibility(View.VISIBLE);
                            //进入全屏的模式 0横屏 1竖屏 2传感器自动横竖屏 3根据视频比例自动确定横竖屏      -1什么都不做
                            binding.qs.enterFullMode = 3;
                            binding.qs.setMute(mute);
                            //是否非全屏下也可以手势调节进度
                            binding.qs.isWindowGesture = true;
                            binding.qs.setOnClickListener(new View.OnClickListener() {
                                @Override
                                public void onClick(View view) {
                                    binding.qs.play();
                                }
                            });
                            binding.qs.setPlayListener(new PlayListener() {
                                int mode;
                                @Override
                                public void onStatus(int status, String ul) {//播放状态
                                    if (status == IVideoPlayer.STATE_AUTO_COMPLETE)
                                        binding.qs.quitWindowFullscreen();//播放完成退出全屏
                                }

                                @Override//全屏/普通/浮窗
                                public void onMode(int mode) {
                                    this.mode = mode;
                                }

                                @Override
                                public void onEvent(int what, Integer... extra) {
                                    if (what == EVENT_MUTE_CHANGED){
                                        SharedPreferencesUtil.getInstance(activity).setBoolean(MUTE, extra[0]==0);
                                    }
                                }

                                @Override
                                public void onPlaying(String url) {

                                }

                                @Override
                                public void notifyPlaying(String url) {

                                }
                            });
                            binding.qs.release();
                            binding.qs.setUp(QSVideo.Build(resource.getResourceUrl()).build());
                            binding.qs.play();
                        }
                    }
//                    String screenshotImg = appBean.getScreenshot();
                    List<ResourceItem> screenshotList = appBean.getScreenshotList();
                    if (!screenshotList.isEmpty()){
                            binding.banner.setAdapter(new BannerImageAdapter<ResourceItem>(screenshotList) {
                                @Override
                                public void onBindView(BannerImageHolder holder, ResourceItem data, int position, int size) {
                                    ImageUtil.load(activity, holder.imageView, data.getResourceUrl());
                                    holder.imageView.setOnClickListener(new View.OnClickListener() {
                                        @Override
                                        public void onClick(View v) {
                                            ImagePreview
                                                    .getInstance()
                                                    // 上下文，必须是activity，不需要担心内存泄漏，本框架已经处理好；
                                                    .setContext(requireActivity())
                                                    // 设置从第几张开始看（索引从0开始）
                                                    .setIndex(0)
                                                    // 有三种设置数据集合的方式，根据自己的需求进行三选一：
                                                    // 1：第一步生成的imageInfo List
                                                    //.setImageInfoList(imageInfoList)
                                                    // 2：直接传url List
//                                    .setImageList(imageList)
                                                    // 3：只有一张图片的情况，可以直接传入这张图片的url
                                                    //.setImage(String image)
                                                    .setImage(data.getResourceUrl())
//                                    .setImage("http://s3-zz-prda.sail-cloud.com/sit-soa-public-oss-sjjg/app_store/MA591164094315982165188096979898/_previews/a217ad4e0ca14153b5d686f197a054d9.png")
                                                    // 开启预览
                                                    .start();
                                        }
                                    });
                                }
                            })
//                            .addBannerLifecycleObserver(this)//添加生命周期观察者
                            .setIndicator(new CircleIndicator(requireContext()));
                    }
                    ImageUtil.load(activity, binding.icon, appBean.getIconUrl());
                    if (StringUtils.isNotEmpty(appBean.getDescription())){
                        binding.desc.setText(appBean.getDescription());
                        binding.desc.setOnClickListener(new View.OnClickListener() {
                            @Override
                            public void onClick(View v) {
                                boolean b = binding.desc.getExpandableStatus();
                                binding.desc.setExpandable(!b);
                            }
                        });
                    }
                    AppDetailSku sku = appBean.getSku();
                    binding.producer2.setText(appBean.getProducer());
                    if (ObjectUtils.isNotEmpty(sku)) {
                        binding.officialGroup.setText(sku.getQqGroupNo());
                        binding.version.setText(appBean.getVersion());
                        binding.size.setText(appBean.getFileSize());
                        binding.updateTime.setText(sku.getVersionUpdateTime());
                        binding.netProtocol.setText(sku.getNetProtocol());
                        binding.adaptiveModel.setText(sku.getVehicleType());
                        binding.oneWord.setText(appBean.getDescription());
                        binding.producer3.setText(appBean.getProducer());
                    }
                }
            }
        });


        viewModel.getCurrentCommentList().observe(getViewLifecycleOwner(), commentEntityCommentPage -> {
            if (ObjectUtils.isNotEmpty(commentEntityCommentPage)) {
                bottomSheetAdapter.setNewData(commentEntityCommentPage.getDataList());
            }else {
                bottomSheetAdapter.setNewData(new ArrayList<>());
            }
        });
        viewModel.getCommentScore().observe(getViewLifecycleOwner(), appCommentScoreEntity -> {
            if (ObjectUtils.isNotEmpty(appCommentScoreEntity)) {
                binding.averageScore.setText("" + appCommentScoreEntity.getAverageScore());
                binding.score.setText("" + appCommentScoreEntity.getAverageScore());
                binding.commentCount.setText("" + appCommentScoreEntity.getCommentCount() + " 人评分");
                try {
                    binding.line5.setProgress(appCommentScoreEntity.getFiveScore());
                    binding.line4.setProgress(appCommentScoreEntity.getFourScore());
                    binding.line3.setProgress(appCommentScoreEntity.getThreeScore());
                    binding.line2.setProgress(appCommentScoreEntity.getTwoScore());
                    binding.line1.setProgress(appCommentScoreEntity.getOneScore());
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        });
        viewModel.getError().observe(getViewLifecycleOwner(), new Observer<Result>() {
            @Override
            public void onChanged(Result result) {
                if (ObjectUtils.isNotEmpty(result) && StringUtils.isNotEmpty(result.getResultMsg())) {
                    showLoginFailed(result.getResultMsg());
                }
            }
        });

        binding.btnDownload.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                AppBean appBean = viewModel.getCurrentApp().getValue();
                if (ObjectUtils.isNotEmpty(appBean)){
                    Download download = appBean.getDownload();
                     if (ObjectUtils.isNotEmpty(download)){
                         AppStatusEnum statusEnum = AppStatusEnum.get(download.getDownloadStatus());
                         if (null != statusEnum) {
                             switch (statusEnum) {
                                 case INSTALL_SUCCESS:
                                 case LIGHT_INSTALL_COMPLETE:
                                     viewModel.startApp(getActivity(), appBean);
                                     break;
                                 case DOWNLOAD_NEED_PAY:
                                     UserEntity entity = viewModel.buildUserEntity(activity);
                                     if (entity == null) {
                                         Intent intent = new Intent();
                                         intent.setClass(activity, LoginActivity.class);
                                         activity.startActivity(intent);
                                         return;
                                     } else {
                                         viewModel.submitOrder(activity, appBean, entity, mSubmitRunnable);
                                     }
                                     break;
                                 case DOWNLOAD_DEFAULT:
                                 case DOWNLOAD_DEFAULT_LIGHT:
                                 case DOWNLOAD_PAUSE:
                                 case DOWNLOAD_FAIL:
                                 case LIGHT_INSTALL_FAIL:
                                     viewModel.downLoadApp(getContext(), AppStatusEnum.DOWNLOAD_PREPARE.CODE);
                                     runOnUiThread(new Runnable() {
                                         @Override
                                         public void run() {
                                             if (download.getTotal() > 0) {
                                                 int progress = (int) (download.getDownloadLocation() * 100 / download.getTotal());
                                                 binding.downloadProgress.setProgress(progress);
                                             } else {
                                                 binding.downloadProgress.setProgress(0);
                                             }
                                             binding.btnDownload.setText(AppStatusEnum.DOWNLOAD_PREPARE.TITLE);
                                         }
                                     });
                                     break;
                                 case DOWNLOAD_PREPARE:
                                 case DOWNLOAD_LOADING:
                                     viewModel.downLoadApp(getContext(), AppStatusEnum.DOWNLOAD_PAUSE.CODE);
                                     runOnUiThread(new Runnable() {
                                         @Override
                                         public void run() {
                                             binding.btnDownload.setText(AppStatusEnum.DOWNLOAD_PAUSE.TITLE);
                                         }
                                     });
                                     break;
                                 case INSTALL_FAIL:
                                     viewModel.install(getContext(), AppStatusEnum.INSTALL_PREPARE);
                                     binding.installProgress.setVisibility(View.VISIBLE);
                                     break;
                                 case DOWNLOAD_PAYED:
                                 default:
                                     break;
                             }
                         }
                    } else {
                         //TODO test
//                         appBean.setProductPrice("0.00");
                         if (appBean.needPay() && ObjectUtils.isEmpty(appBean.getPay())) {
                             UserEntity entity = viewModel.buildUserEntity(activity);
                             if (entity == null) {
                                 Intent intent = new Intent();
                                 intent.setClass(activity, LoginActivity.class);
                                 activity.startActivity(intent);
                             } else {
                                 viewModel.submitOrder(activity, appBean, entity, mSubmitRunnable);
                             }
                         } else if (appBean.getAppType().equals(AppTypeEnum.APP_LIGHT.getName())) {
                             viewModel.downLoadApp(getContext(), AppStatusEnum.DOWNLOAD_PREPARE.CODE);
                             runOnUiThread(new Runnable() {
                                 @Override
                                 public void run() {
                                     binding.downloadProgress.setProgress(0);
//                                    binding.btnDownload.setText("快应用安装推送中...");
                                     binding.btnDownload.setText("loading");
                                 }
                             });
                         } else {
                             viewModel.downLoadApp(getContext(), AppStatusEnum.DOWNLOAD_PREPARE.CODE);
                             runOnUiThread(new Runnable() {
                                 @Override
                                 public void run() {
                                     binding.downloadProgress.setProgress(0);
                                     binding.btnDownload.setText(AppStatusEnum.DOWNLOAD_PREPARE.TITLE);
                                 }
                             });
                         }
                    }
                }
            }
        });
        viewModel.getAppletPushResponse().observe(getViewLifecycleOwner(), new Observer<Result<AppPushResponse>>() {
            @Override
            public void onChanged(Result<AppPushResponse> appletPushResponse) {
                if (appletPushResponse.getResultCode().equals("200")){
                    runOnUiThread(new Runnable() {
                        @Override
                        public void run() {
                            binding.btnDownload.setText(LIGHT_INSTALL_COMPLETE.TITLE);
                        }
                    });
                } else {
                    runOnUiThread(new Runnable() {
                        @Override
                        public void run() {
                            binding.btnDownload.setText("快应用安装失败，code="+appletPushResponse.getResultCode());
                        }
                    });
                }
            }
        });
        binding.downloadProgress.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (binding.downloadProgress.getProgress() < 100) {
                    viewModel.downLoadApp(getContext(), AppStatusEnum.DOWNLOAD_PAUSE.CODE);
                    runOnUiThread(new Runnable() {
                        @Override
                        public void run() {
                            binding.btnDownload.setVisibility(View.VISIBLE);
                        }
                    });
                }
            }
        });
        Object payObj = viewModel.getPayStatus();
        if (ObjectUtils.isNotEmpty(payObj)) {
            Boolean pay = (Boolean) payObj;
            if (pay) {
                Object obj = viewModel.getCurrentOrderAppEntity();
                if (ObjectUtils.isEmpty(obj)) {
                    Log.w(TAG, "init price fail, null order app");
                    return;
                }
                AppBean appEntity = (AppBean) obj;
                viewModel.setCurrentApp(appEntity);
                viewModel.downLoadApp(getContext(), AppStatusEnum.DOWNLOAD_PREPARE.CODE);
                viewModel.clearPayStatus();
            }
        }
    }

    Handler handler = new Handler(new Handler.Callback() {
        @Override
        public boolean handleMessage(@NonNull Message msg) {

            switch (msg.what){
                case 1:
                    Download download = (Download)msg.obj;
                    if (ObjectUtils.isEmpty(download) || ObjectUtils.isEmpty(viewModel.getCurrentApp().getValue()) || !download.getCode().equals(viewModel.getCurrentApp().getValue().getCode())){
                        break;
                    }
                    AppBean appBean = viewModel.getCurrentApp().getValue();
                    appBean.setDownload(download);
                    viewModel.setCurrentApp(appBean);
                    break;
            }
            return false;
        }
    });

    @Override
    public void onResume() {
        super.onResume();
        initView();
        initData();
    }

    @Override
    public void onStart() {
        super.onStart();
        binding.banner.start();
    }

    @Override
    public void onStop() {
        super.onStop();
        viewModel.getError().setValue(null);
        binding.banner.stop();
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        binding.banner.destroy();
        binding.qs.release();
    }

    @Override
    public void onPause() {
        super.onPause();
        binding.qs.pause();
    }

    private void initData(){
        setHandler(handler);
        viewModel.getAppDetail(activity);
    }

    @Override
    public void onMoreClick(View layout, int position) {
    }

    @Override
    public void onItemClick(View view, ReplyEntity bean, int position) {

    }

    @Override
    public void onLikeClick(View layout, ReplyEntity bean, int position) {

    }

    @Override
    public void onLoadMoreRequested() {

    }

}